package com.link2room.blaster.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/6/29.11:53
 */
@Entity
@Table(name = "in_mail_receiver" )
public class InMailReceiverEntity extends BaseEntity {
    public enum InMailReceiverEntity_{
        receiverCode,inmailType
    }
    private String receiverCode;
    private String inmailType;

    @Basic
    @Column(name = "receiver_code")
    public String getReceiverCode() {
        return receiverCode;
    }

    public void setReceiverCode(String receiverCode) {
        this.receiverCode = receiverCode;
    }

    @Basic
    @Column(name = "inmail_type")
    public String getInmailType() {
        return inmailType;
    }

    public void setInmailType(String inmailType) {
        this.inmailType = inmailType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InMailReceiverEntity that = (InMailReceiverEntity) o;

        if (receiverCode != null ? !receiverCode.equals(that.receiverCode) : that.receiverCode != null) return false;
        if (inmailType != null ? !inmailType.equals(that.inmailType) : that.inmailType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = receiverCode != null ? receiverCode.hashCode() : 0;
        result = 31 * result + (inmailType != null ? inmailType.hashCode() : 0);
        return result;
    }
}
